/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.kj.entity;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;

import com.jeesite.common.utils.excel.annotation.ExcelField;
import com.jeesite.common.utils.excel.annotation.ExcelFields;
import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

import java.math.BigDecimal;
import com.jeesite.common.utils.excel.annotation.ExcelField.Align;
/**
 * kj_contribute_projectEntity
 * @author hzy
 * @version 2021-07-13
 */
@Table(name="kj_contribute_project", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="name", attrName="name", label="项目名", queryType=QueryType.LIKE),
		@Column(name="description", attrName="description", label="描述", isQuery=false),
		@Column(name="content", attrName="content", label="项目内容", isQuery=false),
		@Column(name="target", attrName="target", label="目标积分", isQuery=false),
		@Column(name="contribute", attrName="contribute", label="已捐赠积分", isQuery=false),
		@Column(name="per_contribute", attrName="perContribute", label="每捐赠积分", isQuery=false),
		@Column(name="contribute_money", attrName="contributeMoney", label="捐赠金额", isQuery=false),
		@Column(name="unit", attrName="unit", label="每次捐赠单位", isQuery=false),
		@Column(name="headimg", attrName="headimg", label="封面图", isQuery=false),
		@Column(name="project_type", attrName="projectType", label="项目类型"),
		@Column(name="project_status", attrName="projectStatus", label="项目状态"),
		@Column(name="banner", attrName="banner", label="轮播图"),
		@Column(name="total_user_num", attrName="totalUserNum", label="总捐赠人数", isQuery = false),
		@Column(includeEntity=DataEntity.class),
	}, orderBy="a.project_status asc, a.update_date DESC"
)
public class KjContributeProject extends DataEntity<KjContributeProject> {

	private static final long serialVersionUID = 1L;
	public static final String FINISHED = "1";
	private String name;		// 项目名
	private String description;		// 描述
	private String content;		// 项目内容
	private BigDecimal target;		// 目标积分
	private BigDecimal contribute;		// 已捐赠积分
	private BigDecimal contributeMoney;		// 捐赠金额
	private BigDecimal perContribute;		// 每捐赠积分
	private BigDecimal unit;		// 每次捐赠单位
	private String headimg;
	private String banner;
	private String projectType;
	private int totalUserNum;
	private String projectStatus;

	private String createDateStr;
	private String memberId;
	public KjContributeProject() {
		this(null);
	}

	public KjContributeProject(String id){
		super(id);
	}


	@Valid
	@ExcelFields({
			@ExcelField(title="项目名", attrName="name", align=Align.CENTER, sort=35),
			@ExcelField(title="目标积分", attrName="target", align= Align.CENTER, sort=50),
			@ExcelField(title="已捐赠积分", attrName="contribute", align=Align.CENTER, sort=55),
			@ExcelField(title="每次捐赠单位", attrName="unit", align=Align.CENTER, sort=60),
			})

	@NotBlank(message="项目名不能为空")
	@Length(min=0, max=255, message="项目名长度不能超过 255 个字符")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Length(min=0, max=255, message="描述长度不能超过 255 个字符")
	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public BigDecimal getTarget() {
		return target;
	}

	public void setTarget(BigDecimal target) {
		this.target = target;
	}

	public BigDecimal getContribute() {
		return contribute;
	}

	public void setContribute(BigDecimal contribute) {
		this.contribute = contribute;
	}

	public BigDecimal getUnit() {
		return unit;
	}

	public void setUnit(BigDecimal unit) {
		this.unit = unit;
	}

	public String getHeadimg() {
		return headimg;
	}

	public void setHeadimg(String headimg) {
		this.headimg = headimg;
	}

	public String getProjectType() {
		return projectType;
	}

	public void setProjectType(String projectType) {
		this.projectType = projectType;
	}

	public String getBanner() {
		return banner;
	}

	public void setBanner(String banner) {
		this.banner = banner;
	}

	public int getTotalUserNum() {
		return totalUserNum;
	}

	public void setTotalUserNum(int totalUserNum) {
		this.totalUserNum = totalUserNum;
	}

	public BigDecimal getContributeMoney() {
		return contributeMoney;
	}

	public void setContributeMoney(BigDecimal contributeMoney) {
		this.contributeMoney = contributeMoney;
	}

	public BigDecimal getPerContribute() {
		return perContribute;
	}

	public void setPerContribute(BigDecimal perContribute) {
		this.perContribute = perContribute;
	}

	public String getProjectStatus() {
		return projectStatus;
	}

	public void setProjectStatus(String projectStatus) {
		this.projectStatus = projectStatus;
	}

	public String getCreateDateStr() {
		return createDateStr;
	}

	public void setCreateDateStr(String createDateStr) {
		this.createDateStr = createDateStr;
	}


	public String getMemberId() {
		return memberId;
	}

	public void setMemberId(String memberId) {
		this.memberId = memberId;
	}
}
